<!DOCTYPE html>
<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp" %>
<%response.setHeader("Pragma","No-cache");
	response.setHeader("Cache-Control","no-cache");
	response.setDateHeader("Expires", 0);
	response.flushBuffer();%>
<html>
<head>
<meta charset="utf-8">
<meta charset="UTF-8">
<meta http-equiv="Cache-Control" content="max-age=7200" />
<meta name="format-detection" content="telephone=yes">
<meta name="viewport" content="width=device-width, maximum-scale=1.0, user-scalable=no">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<link rel="icon" href="https://static.jianshukeji.com/highcharts/images/favicon.ico">
<style type="text/css">
	#container {
		height: 90vh;
		margin: 0 auto;
	}
</style>
<script src="https://img.hcharts.cn/highcharts/highcharts.js"></script>
<script src="https://img.hcharts.cn/highcharts/modules/exporting.js"></script>
<script src="https://img.hcharts.cn/highcharts/modules/oldie.js"></script>
<script src="https://img.hcharts.cn/highcharts-plugins/highcharts-zh_CN.js"></script>
<script src="https://img.hcharts.cn/highcharts/themes/sand-signika.js"></script>
<script type="text/javascript" src="${ctxStatic}/ajz/js/jquery.min.js"></script>
</head>
<body>
<div id="container" style="min-width:400px;height:550px"></div>
<script>

    $(document).ready(function() {
        var msg = 'species';
        $.ajax({
            url: "/a/ajz/ajzBaseinfo/findCheckTime",
            type: "POST",
            data: "msg="+msg,
            dataType: "json",
            async: true,
            success: function (map) {
                var Jan = parseInt(map.Jan);
                var Feb = parseInt(map.Feb);
                var Mar = parseInt(map.Mar);
                var Apr = parseInt(map.Apr);
                var May = parseInt(map.May);
                var Jun = parseInt(map.Jun);
                var Jul = parseInt(map.Jul);
                var Aug = parseInt(map.Aug);
                var Sep = parseInt(map.Sep);
                var Oct = parseInt(map.Oct);
                var Nov = parseInt(map.Nov);
                var Dec = parseInt(map.Dec);

                getDate(Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec);
            }
        });
    });

	function getDate(Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec) {
        var chart = Highcharts.chart('container', {
            chart: {
                type: 'line'
            },
            title: {
                text: '月平均排查量'
            },
            subtitle: {
                text: '数据来源: 新阳安监站'
            },
            xAxis: {
                categories: ['2018.01', '2018.02', '2018.03', '2018.04', '2018.05', '2018.06', '2018.07', '2018.08', '2018.09', '2018.10', '2018.11', '2018.12']
            },
            yAxis: {
                title: {
                    text: '排查数量 (次)'
                }
            },
            plotOptions: {
                line: {
                    dataLabels: {
                        // 开启数据标签
                        enabled: true
                    },
                    // 关闭鼠标跟踪，对应的提示框、点击事件会失效
                    enableMouseTracking: false
                }
            },
            series: [{
                name: '安全生产',
                data: [Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec]
            }]
        });
    }
</script>
</body>
</html>